import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '类型',
    align: "center",
    dataIndex: 'category'
  },
  {
    title: '项目',
    align: "center",
    dataIndex: 'project'
  },
  {
    title: '行为标准',
    align: "center",
    dataIndex: 'behavioralStandards'
  },
  {
    title: '固小豆值',
    align: "center",
    dataIndex: 'guxiaodouValue'
  },
  {
    title: '证明材料',
    align: "center",
    dataIndex: 'supportDocuments'
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "类型",
    field: 'category',
    component: 'Select',
    componentProps: {
      options: [
        { label: '文化价值观类', value: '文化价值观类' },
        { label: '客户服务类', value: '客户服务类' },
        { label: '业务攻坚类', value: '业务攻坚类' },
        { label: '团队协作类', value: '团队协作类' },
        { label: '项目管理类', value: '项目管理类' },
        { label: '团队成长类', value: '团队成长类' },
        { label: '特殊场景类', value: '特殊场景类' },
      ],
      placeholder: '请选择类型',
    },
    //colProps: {span: 6},
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '类型',
    field: 'category',
    component: 'Input',
  },
  {
    label: '项目',
    field: 'project',
    component: 'Input',
  },
  {
    label: '行为标准',
    field: 'behavioralStandards',
    component: 'Input',
  },
  {
    label: '固小豆值',
    field: 'guxiaodouValue',
    component: 'Input',
  },
  {
    label: '证明材料',
    field: 'supportDocuments',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false
  },
];

// 高级查询数据
export const superQuerySchema = {
  category: { title: '类型', order: 0, view: 'text', type: 'string', },
  project: { title: '项目', order: 1, view: 'text', type: 'string', },
  behavioralStandards: { title: '行为标准', order: 2, view: 'text', type: 'string', },
  guxiaodouValue: { title: '固小豆值', order: 3, view: 'text', type: 'string', },
  supportDocuments: { title: '证明材料', order: 4, view: 'text', type: 'string', },
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[] {
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}